<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="renderer" content="webkit" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
    <title><%= webpackConfig.name %></title>
    <!-- prettier-ignore -->
    <!--[if lt IE 11]><script>window.location.href = '/html/ie.html'</script><![endif]-->

    <style>
      html,
      body,
      #app {
        width: 100%;
        height: 100%;
        padding: 0;
        margin: 0;
      }
      .loading-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
      }
      .loading-box .loading-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 98px;
      }
      .dot {
        position: relative;
        box-sizing: border-box;
        display: inline-block;
        width: 32px;
        height: 32px;
        font-size: 32px;
        -webkit-transform: rotate(45deg);
        -ms-transform: rotate(45deg);
        -moz-transform: rotate(45deg);
        -o-transform: rotate(45deg);
        transform: rotate(45deg);
        -webkit-animation: ant-rotate 1.2s infinite linear;
        -ms-animation: ant-rotate 1.2s infinite linear;
        -moz-animation: ant-rotate 1.2s infinite linear;
        -o-animation: ant-rotate 1.2s infinite linear;
        animation: ant-rotate 1.2s infinite linear;
      }
      .dot i {
        position: absolute;
        display: block;
        width: 14px;
        height: 14px;
        background-color: #409eff;
        border-radius: 100%;
        opacity: 0.3;
        -webkit-transform: scale(0.75);
        -ms-transform: scale(0.75);
        -moz-transform: scale(0.75);
        -o-transform: scale(0.75);
        transform: scale(0.75);
        -webkit-transform-origin: 50% 50%;
        -ms-transform-origin: 50% 50%;
        -moz-transform-origin: 50% 50%;
        -o-transform-origin: 50% 50%;
        transform-origin: 50% 50%;
        -webkit-animation: ant-spin-move 1s infinite linear alternate;
        -ms-animation: ant-spin-move 1s infinite linear alternate;
        -moz-animation: ant-spin-move 1s infinite linear alternate;
        -o-animation: ant-spin-move 1s infinite linear alternate;
        animation: ant-spin-move 1s infinite linear alternate;
      }
      .dot i:nth-child(1) {
        top: 0;
        left: 0;
      }
      .dot i:nth-child(2) {
        top: 0;
        right: 0;
        -webkit-animation-delay: 0.4s;
        -ms-animation-delay: 0.4s;
        -moz-animation-delay: 0.4s;
        -o-animation-delay: 0.4s;
        animation-delay: 0.4s;
      }
      .dot i:nth-child(3) {
        right: 0;
        bottom: 0;
        -webkit-animation-delay: 0.8s;
        -ms-animation-delay: 0.8s;
        -moz-animation-delay: 0.8s;
        -o-animation-delay: 0.8s;
        animation-delay: 0.8s;
      }
      .dot i:nth-child(4) {
        bottom: 0;
        left: 0;
        -webkit-animation-delay: 1.2s;
        -ms-animation-delay: 1.2s;
        -moz-animation-delay: 1.2s;
        -o-animation-delay: 1.2s;
        animation-delay: 1.2s;
      }

      @-webkit-keyframes ant-rotate {
        to {
          -webkit-transform: rotate(405deg);
          -ms-transform: rotate(405deg);
          -moz-transform: rotate(405deg);
          -o-transform: rotate(405deg);
          transform: rotate(405deg);
        }
      }
      @keyframes ant-rotate {
        to {
          -webkit-transform: rotate(405deg);
          -ms-transform: rotate(405deg);
          -moz-transform: rotate(405deg);
          -o-transform: rotate(405deg);
          transform: rotate(405deg);
        }
      }

      @-webkit-keyframes ant-spin-move {
        to {
          opacity: 1;
        }
      }
      @keyframes ant-spin-move {
        to {
          opacity: 1;
        }
      }
    </style>
  </head>
  <body>
    <div id="app">
      <div class="loading-box">
        <div class="loading-wrap">
          <span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
        </div>
      </div>
    </div>
    <script>
      const globalState = JSON.parse(window.localStorage.getItem('layout-setting'))
      if (globalState) {
        const dot = document.querySelectorAll('.dot i')
        const html = document.querySelector('html')
        dot.forEach(item => (item.style.background = globalState.theme))
        if (globalState.isDark) html.style.background = '#141414'
      }
    </script>
  </body>
</html>
